package com.example.config;


import java.util.concurrent.*;

public class psvm {
    public static void main(String[] args) throws ExecutionException, InterruptedException {

        ExecutorService threadPoolExecutor = new ThreadPoolExecutor(3, 5, 2,
                TimeUnit.SECONDS, new ArrayBlockingQueue<>(4), Executors.defaultThreadFactory(),
                new ThreadPoolExecutor.AbortPolicy());
        MyCallAble myCallAble=new MyCallAble(2L);
        Future<String> submit = threadPoolExecutor.submit(myCallAble);
        String s = submit.get();
        System.out.println(s);

//        ExecutorService executorService = Executors.newFixedThreadPool(3);
//        MyCallAble myCallAble=new MyCallAble(2L);
//        executorService.submit(myCallAble);
    }

}
